package common;

import java.util.HashMap;

import server.ClientService;
import server.RoomManager;


public final class ServerMessage extends ControlMessage {
	
	private static final long serialVersionUID = -5436657096013247629L;
	
	private final RoomManager rm;
	private final HashMap<ClientService, String> clients;
	
	public ServerMessage(MessageType type) {
		super(type);
		
		rm = null;
		clients = null;
	}
	
	public ServerMessage(MessageType type, RoomManager rm, HashMap<ClientService, String> clients) {
		super(type);
		
		this.rm = rm;
		this.clients = clients;
	}
	
	public ServerMessage(ControlMessage msg, boolean success) {
		super(msg, success);
		
		rm = null;
		clients = null;
	}

	public RoomManager getRm() {
		return rm;
	}

	public HashMap<ClientService, String> getClients() {
		return clients;
	}
	
}
